<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/vue.js"></script>
</head>
<body>
    <div id="app">
        <h1>{{msg}}</h1>
        <h3 v-show="show1">展示数据1</h3>
        <!-- <h3 v-show="show2">展示数据2</h3> -->
        <h3 v-if="show1">今天是个好天气</h3>
        <button @click="showMessage">{{show1?'隐藏':'展示'}}数据</button>
    </div>
</body>
</html>
<script>
    var app = new Vue({
        el: '#app',
        data: {
            msg:'你好东',
            show1:false,
            // show2:true,
            buttonMessage:'展示'
        },
        methods:{
            showMessage(){
                this.show1 = !this.show1
            }
        }
    })
</script>